- source_hostname = @source_user.source_hostname
- source_name = @source_user.source_name
- source_username = "@#{@source_user.source_username}"
- reassign_to_name = @reassign_to_user.name
- reassign_to_username = link_to @reassign_to_user.to_reference, user_url(@reassign_to_user)
- reassigned_by = @source_user.reassigned_by_user
- reassigned_by_name = reassigned_by.name
- reassigned_by_username = link_to reassigned_by.to_reference, user_url(reassigned_by)
- destination_group = "#{@source_user.namespace.name} (/#{@source_user.namespace.full_path})"

- text_style = 'font-size:16px; text-align:center; line-height:24px; margin-top: 24px;'
- heading_style = 'font-size:14px; line-height:20px; margin-top: 16px; margin-bottom: 8px;'
- details_text_style = 'font-size:14px; line-height:20px; margin-top: 8px; margin-bottom: 8px;'
- button_style = 'border: 1px solid #694cc0; border-radius: 4px; font-size: 14px; padding: 8px 16px; background-color: #7b58cf; color: #fff; cursor: pointer;'

- strong_tag_pair = tag_pair(tag.strong, :strong_open, :strong_close)
- help_link_tag_pair = tag_pair(link_to('', help_page_url('user/import/mapping.md', anchor: 'accept-contribution-reassignment'), target: '_blank', rel: 'noopener noreferrer'), :link_start, :link_end)
- report_link_tag_pair = tag_pair(link_to('', help_page_url('user/report_abuse.md'), target: '_blank', rel: 'noopener noreferrer'), :report_link_start, :report_link_end)

%p{ style: text_style }
  = safe_format(s_('UserMapping|%{reassigned_by_name} (%{reassigned_by_username}) wants to reassign contributions from %{source_name} (%{source_username}) on %{source_hostname} to you in %{destination_group}.'),
    reassigned_by_name: reassigned_by_name,
    reassigned_by_username: reassigned_by_username,
    source_name: source_name,
    source_username: source_username,
    source_hostname: source_hostname,
    destination_group: destination_group)

%p{ style: text_style }
  = link_to namespaced_show_import_source_users_url(@source_user.namespace_id, @source_user.reassignment_token), target: '_blank', rel: 'noopener noreferrer' do
    %button{ type: 'button', style: button_style }
      = s_('UserMapping|Review reassignment details')

%p{ style: text_style }
  = safe_format(s_("UserMapping|For more information, see %{link_start}accept contribution reassignment%{link_end}. %{strong_open}If you do not recognize this request, %{report_link_start}report abuse%{report_link_end}.%{strong_close}"), strong_tag_pair, help_link_tag_pair, report_link_tag_pair)

%hr

%h5{ style: heading_style }
  = s_('UserMapping|Import details:')
%p{ style: details_text_style }
  = safe_format(s_('UserMapping|Imported from: %{source_hostname}'), source_hostname: source_hostname)
%p{ style: details_text_style }
  = safe_format(s_('UserMapping|Original user: %{source_name} (%{source_username})'), source_name: source_name, source_username: source_username)

%h5{ style: heading_style }
  = s_('UserMapping|Reassignment details:')
%p{ style: details_text_style }
  = safe_format(s_('UserMapping|Imported to: %{destination_group}'), destination_group: destination_group)
%p{ style: details_text_style }
  = safe_format(s_('UserMapping|Reassigned to: %{reassign_to_name} (%{reassign_to_username})'), reassign_to_name: reassign_to_name, reassign_to_username: reassign_to_username)
%p{ style: details_text_style }
  = safe_format(s_('UserMapping|Reassigned by: %{reassigned_by_name} (%{reassigned_by_username})'), reassigned_by_name: reassigned_by_name, reassigned_by_username: reassigned_by_username)
